package pacote;

import org.restlet.Application;
import org.restlet.Restlet;
import org.restlet.routing.Route;
import org.restlet.routing.Router;
	
public class Principal extends Application {
	
	@Override
	public synchronized Restlet createInboundRoot() {
		// Create a router Restlet that routes each call to a
		// new instance of HelloWorldResource.
		Router router = new Router(getContext());
		router.setDefaultMatchingQuery(true);
		// Defines only one route
		router.attach("/{acao}?lat={latitude}&lon={longitude}&dist={distancia}", PrincipalControle.class);
		//router.attach("/{acao}", PrincipalControle.class);
		return router;
	}
}
